@mixin box {
  width: 240px;
  height: 170px;
  background-color: #fff;
  border-radius: 5px;
  margin: 0 10px 10px 0;
}

.xqjr-upload-wrapper {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;

  &.column {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
  }

  .ant-upload.ant-upload-drag {
    background-color: #fff;
    border: none;
  }

  .ant-upload.ant-upload-select {
    width: 100%;
  }

  .ant-upload-list {
    display: none;
  }

  .xqjr-upload-button {
    .xqjr-upload-button-text {
      font-size: 14px;
      margin-top: 8px;
      color: #999;
    }
  }

  .xqjr-upload-nameList {
    margin-top: 10px;
    width: 100%;

    .xqjr-upload-nameList-item {
      margin-bottom: 10px;
      display: flex;
      justify-content: space-between;
      flex-direction: row;
      align-items: center;

      // .xqjr-upload-nameList-item-text {}

      .xqjr-upload-nameList-item-input {
        max-width: 500px;
      }
    }
  }

  .xqjr-upload-list {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: wrap;
    flex-direction: row;

    .xqjr-upload-list-item {
      @include box;
      border: 1px solid #e8e8e8;
      padding: 5px;
      position: relative;

      &:hover {
        .xqjr-upload-list-item-mask {
          opacity: 1;
        }
      }

      .xqjr-upload-list-item-mask {
        opacity: 0;
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        z-index: 10;
        background-color: rgba(0, 0, 0, 0.7);

        i {
          font-size: 20px;
          color: #fff;
          cursor: pointer;
          margin-right: 10px;
        }
      }

      .xqjr-upload-list-item-img {
        width: 230px;
        height: 130px;
        overflow: hidden;

        img {
          width: 100%;
          height: auto;
        }
      }

      .xqjr-upload-list-item-text {
        line-height: 30px;
        color: #666;
        text-align: left;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
    }
  }

  .xqjr-upload-action {
    @include box;
    border: 1px dashed #eee;
    cursor: pointer;

    .xqjr-upload-action-inner {
      flex: 1;
      background-color: #f6f6f6;
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
    }

    .ant-upload-drag {
      background-color: #f6f6f6;
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
    }

    .ant-upload-select {
      height: 100%;

      span.ant-upload {
        height: 100%;
        background-color: #f6f6f6;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
      }
    }

    .xqjr-upload-action-icon {
      font-size: 40px;
      color: #999;
    }

    .xqjr-upload-action-text {
      font-size: 16px;
      margin-top: 8px;
      color: #999;
    }
  }

  .xqjr-upload-empty {
    color: #999;
  }
}

.xqjr-upload-avatar {
  .xqjr-upload-avatar-inners {
    position: relative;
    width: 85px;
    height: 85px;
    background-color: #fafafa;
    border: 1px dashed #d9d9d9;
    border-radius: 4px;
    transition: border-color .3s ease;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .xqjr-upload-avatar-inner {
    position: relative;
    width: 85px;
    height: 85px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
  }

  .xqjr-upload-avatar-img {
    width: 100%;
    height: 100%;
  }

  .xqjr-upload-avatar-mask {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 30px;
    background-color: rgba(0, 0, 0, 0.3);
    text-align: center;
    color: #fff;
    line-height: 25px;
    font-size: 12px;
  }
}